<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双向数据绑定</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    姓名：<input type="text" v-model="name"><br>
    年龄：<input type="text" v-model="user.age"><br>
    性别：<input type="text" v-model="user.sex"><br>
    住址：<input type="text" v-model="user.address"><br>

    姓名:{{name}},年龄:{{user.age}}

</div>


<script type="application/javascript">
    var vue = new Vue({
        el:'#app',
        data:{
            name:'陶周',
            user:{
                age:18,
                sex:'男',
                address:'大石'
            }
        }
    });


</script>

</body>
</html>